<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
  "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-hans"
	version="XHTML+RDFa 1.0" dir="ltr" xmlns:th="www.thymeleaf.org">
<script src="js/axios.min.js"></script>
<script src="js/vue.min.js"></script>
<head profile="http://www.w3.org/1999/xhtml/vocab">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="misc/favicon.ico"
	type="image/vnd.microsoft.icon" />
<meta name="generator" content="开放书屋 (#)" />
<meta name="rights" content="开放书屋，版权所有" />
<title>用户帐户 | 灿然书屋</title>
<link type="text/css" rel="stylesheet"
	href="sites/default/files/css/css_xE-rWrJf-fncB6ztZfd2huxqgxu4WO-qwma6Xer30m4.css"
	media="all" />
<link type="text/css" rel="stylesheet"
	href="sites/default/files/css/css_rAWFMaRvev_YVJgRAKK7yVXwsgx9afi98jo7qDGwEf8.css"
	media="all" />
<link type="text/css" rel="stylesheet"
	href="sites/default/files/css/css_NCOSdpoQnWWQHVcfG2o2skDLf8YSjSAlOAadPoELzbo.css"
	media="all" />
<link type="text/css" rel="stylesheet"
	href="sites/default/files/css/css_bdATSoh3o2IK3XRLY7797zuX1tE3-0Stkdq5mD0eflg.css"
	media="all" />

<!--[if lt IE 9]>
<link type="text/css" rel="stylesheet" href="sites/all/themes/dushu/css/fix-ie7.css?q633bi" media="all" />
<![endif]-->

<!--[if lt IE 7]>
<link type="text/css" rel="stylesheet" href="sites/all/themes/dushu/css/fix-ie6.css?q633bi" media="all" />
<![endif]-->
<script type="text/javascript"
	src="sites/default/files/js/js_qikmINIYTWe4jcTUn8cKiMr8bmSDiZB9LQqvceZ6wlM.js"></script>
<script type="text/javascript"
	src="sites/default/files/js/js_6uMVSUgDf9ldb_NCxvCamFQoenOq-XcovWYUCJT4HIU.js"></script>
<script type="text/javascript"
	src="sites/default/files/js/js_GoDnzx_E8ykdnHtSllbBGo-0O7ij65Hx3vLfl_xHZg8.js"></script>
<script type="text/javascript"
	src="sites/default/files/js/js_xThLSve1PKygorKK3W5JBKVAg5PaB1uw7YAS7kRSzqc.js"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
	jQuery
			.extend(
					Drupal.settings,
					{
						"basePath" : "\/",
						"pathPrefix" : "",
						"ajaxPageState" : {
							"theme" : "dushu",
							"theme_token" : "1yoLxmrEnEqVl3XQ-SsyPC6ZIcb3o3ChlQrCskJA3gs",
							"js" : {
								"0" : 1,
								"misc\/jquery.js" : 1,
								"misc\/jquery-extend-3.4.0.js" : 1,
								"misc\/jquery.once.js" : 1,
								"misc\/drupal.js" : 1,
								"sites\/all\/modules\/lazyloader\/jquery.lazyloader.js" : 1,
								"public:\/\/languages\/zh-hans_MGNxAABCo8FuXfHAWwvv78Fy5rUBtQGbntYeDIrMceY.js" : 1,
								"sites\/all\/modules\/captcha\/captcha.js" : 1,
								"sites\/all\/modules\/image_captcha_refresh\/image_captcha_refresh.js" : 1,
								"sites\/all\/themes\/dushu\/js\/script.js" : 1
							},
							"css" : {
								"modules\/system\/system.base.css" : 1,
								"modules\/system\/system.menus.css" : 1,
								"modules\/system\/system.messages.css" : 1,
								"modules\/system\/system.theme.css" : 1,
								"modules\/comment\/comment.css" : 1,
								"sites\/all\/modules\/date\/date_api\/date.css" : 1,
								"sites\/all\/modules\/date\/date_popup\/themes\/datepicker.1.7.css" : 1,
								"modules\/field\/theme\/field.css" : 1,
								"modules\/node\/node.css" : 1,
								"modules\/search\/search.css" : 1,
								"sites\/all\/modules\/ubercart\/uc_order\/uc_order.css" : 1,
								"sites\/all\/modules\/ubercart\/uc_product\/uc_product.css" : 1,
								"sites\/all\/modules\/ubercart\/uc_store\/uc_store.css" : 1,
								"modules\/user\/user.css" : 1,
								"sites\/all\/modules\/views\/css\/views.css" : 1,
								"sites\/all\/modules\/lazyloader\/lazyloader.css" : 1,
								"sites\/all\/modules\/ctools\/css\/ctools.css" : 1,
								"sites\/all\/modules\/panels\/css\/panels.css" : 1,
								"sites\/all\/themes\/dushu\/css\/style.css" : 1,
								"sites\/all\/themes\/dushu\/css\/custom.css" : 1,
								"sites\/all\/themes\/dushu\/css\/custom1.css" : 1,
								"sites\/all\/themes\/dushu\/css\/custom2.css" : 1,
								"sites\/all\/themes\/dushu\/css\/custom3.css" : 1,
								"sites\/all\/themes\/dushu\/css\/fix-ie7.css" : 1,
								"sites\/all\/themes\/dushu\/css\/fix-ie6.css" : 1
							}
						},
						"jcarousel" : {
							"ajaxPath" : "\/jcarousel\/ajax\/views"
						},
						"urlIsAjaxTrusted" : {
							"\/user" : true
						}
					});
	//--><!]]>
</script>
<!--[if lt IE 7]>
      <style type="text/css" media="all">@import url("//sites/all/themes/dushu/css/fix-ie6.css");</style>
  <![endif]-->
<!--[if IE 7]>
   <style type="text/css" media="all">@import url("//sites/all/themes/dushu/css/fix-ie7.css");</style>
  <![endif]-->
</head>
<body class="html not-front not-logged-in no-sidebars page-user">
<div id="log">
	<div id="skip-link">
		<a href="#main-content" class="element-invisible element-focusable">跳转到主要内容</a>
	</div>



	<!--首页头部-->

	<div th:replace="index::div#mininav"></div>

	<div th:replace="index::div#header-wrapper1"></div>

	<div class="class_nav"></div>
	<div class="breadcrumb" id="breadcrumb">
		<h2 class="element-invisible">你在这里</h2>
		<div class="breadcrumb">
			<a href="/">首页</a>
		</div>
	</div>
	<div id="content">
		<a id="main-content"></a>
		<h2 class="element-invisible">主标签</h2>
		<ul class="tabs primary">
			<li><a href="register.htm">创建新帐号</a></li>
			<li class="active"><a href="login.htm" class="active">登录<span
					class="element-invisible">（活动标签）</span></a></li>
			<li><a href="modify.htm">重设密码</a></li>
		</ul>
		<div class="region region-content">
			<div id="block-system-main" class="block block-system">


				<div class="content" >
					<form action="login.htm" method="post" id="user-login"
						accept-charset="UTF-8">
						<div>
							<div class="form-item form-type-textfield form-item-name">
								<label for="edit-name">用户名 <span class="form-required"
									title="此项必填。">*</span></label>
								<input v-model="user.username" type="text" id="edit-name"
									name="name" value="" size="60" maxlength="60"
									class="form-text required" />
								<div class="description">输入您在 灿然书屋 的用户名。</div>
							</div>
							<div class="form-item form-type-password form-item-pass">
								<label for="edit-pass">密码 <span class="form-required"
									title="此项必填。">*</span></label>
								<input v-model="user.password" type="password" id="edit-pass"
									name="pass" size="60" maxlength="128"
									class="form-text required" />
								<div class="description">输入与您用户名相匹配的密码。</div>
							</div>
<!--							<input type="hidden" name="form_build_id"-->
<!--								value="form-JVXp71rVOCL1SnIxLGW6jxhqGl_6DEdv77CsgY080ik" /> <input-->
<!--								type="hidden" name="form_id" value="user_login" />-->
<!--							<div class="captcha">-->
<!--								<input type="hidden" name="captcha_sid" value="1522332" /> <input-->
<!--									type="hidden" name="captcha_token"-->
<!--									value="76b33873c1143a6f821bb71a62de570d" />-->
<!--								<div-->
<!--									class="form-item form-type-textfield form-item-captcha-response">-->
<!--									<label for="edit-captcha-response">验证码 <span-->
<!--										class="form-required" title="此项必填。">*</span></label> <input-->
<!--										type="text" id="edit-captcha-response" name="captcha_response"-->
<!--										value="" size="15" maxlength="128" class="form-text required" />-->
<!--									<div class="description">请输入图片中的字符。</div>-->
<!--								</div>-->
<!--								<img data-src="/image_captcha?sid=1522332&amp;ts=1586062147"-->
<!--									src="sites/all/modules/lazyloader/image_placeholder.gif"-->
<!--									width="96" height="48" alt="Image CAPTCHA"-->
<!--									title="Image CAPTCHA" />-->
<!--								<noscript>-->
<!--									<img src="/image_captcha?sid=1522332&amp;ts=1586062147"-->
<!--										width="96" height="48" alt="Image CAPTCHA"-->
<!--										title="Image CAPTCHA" />-->
<!--								</noscript>-->
<!--								<div class="reload-captcha-wrapper">-->
<!--									看不清？<a href="/captcha/refresh/user_login" id="reload-captcha"-->
<!--										class="reload-captcha">换张图</a>-->
<!--								</div>-->
<!--								<div class="clearfix"></div>-->
<!--							</div>-->
							<div class="form-actions form-wrapper" id="edit-actions">
								<input @click.prevent="login" type="submit" id="edit-submit" name="op" value="登录"
									class="form-submit" />
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
	<div class="clear"></div>
	<div th:replace="index::div#footer"></div>
	<a class="go_top" href="javascript:void(0);"></a>



	<div class="region region-page-bottom">
		<noscript>
			<style type="text/css" media="all">
img[data-src] {
	display: none !important;
}
</style>
		</noscript>
	</div>
	<script type="text/javascript">
	<!--//--><![CDATA[//><!--
		(function($) {
			Drupal.behaviors.lazyloader = {
				attach : function(context, settings) {
					$("img[data-src]")
							.lazyloader(
									{
										distance : 0,
										icon : "sites/all/modules/lazyloader/loader/loader-7.gif"
									});
				}
			};
		}(jQuery));
		//--><!]]>
	</script>

	<script>
		var lv = new Vue({
			el : "#log",
			data : {
				user : {username:"", password:""},
				loginedUser : {}
			},
			created(){
				this.getLoginedUser();
			},
			methods:{
				login(){
					let params = new URLSearchParams();
					params.append("username",this.user.username);
					params.append("password",this.user.password);
					axios.post("xm-user/login",params).then(res=>{
						if (res.data.code==1){
							this.getLoginedUser();
							location.href=("/");
							return this.loginedUser;
						}else {
							alert(res.data.msg);
						}
					})
				},
				getLoginedUser(){
					axios.post("xm-user/getLoginedUser").then(res=>{
						if (res.data.code==1){
							this.loginedUser = res.data.data;
							let p = this.loginedUser;
							console.info(p);
							console.info(this.loginedUser);

						}else {
							this.loginedUser = null;
						}
					})
				}
			}
		})
	</script>
</div>
</body>
</html>
